home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1994 October
/
1994-10b.d64
/
units converter
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
1KB
|
36 lines
10 printchr$(147):rem clear screen
20 poke53280,6:rem border to match screen
30 poke646,1:rem print everything white
40 x=16:dimc(x),e$(x),m$(x)
50 forn=1tox:readc(n),e$(n),m$(n):next
60 print"(1) in to km (17) km to in
70 [153]"(2) in to m (18) m to in
80 print"(3) in to cm (19) cm to in
90 [153]"(4) in to mm (20) mm to in
100 print"(5) ft to km (21) km to ft
110 [153]"(6) ft to m (22) m to ft
120 print"(7) ft to cm (23) cm to ft
130 [153]"(8) ft to mm (24) mm to ft
140 print"(9) yd to km (25) km to yd
150 [153]"(10) yd to m (26) m to yd
160 print"(11) yd to cm (27) cm to yd
170 [153]"(12) yd to mm (28) mm to yd
180 print"(13) mi to km (29) km to mi
190 [153]"(14) mi to m (30) m to mi
200 print"(15) mi to cm (31) cm to mi
210 [153]"(16) mi to mm (32) mm to mi
220 input"which number";n
230 ifn<1thenprint"[145][145][145]":goto220
240 ifn>32thenprint"[145][145][145]":goto220
250 ifn>16then290
260 print"how many "e$(n);
270 inputq:a=q*c(n)
280 print:printq;e$(n)" ="a;m$(n):end
290 print"how many "m$(n-x);
300 inputq:a=q*1/c(n-x)
310 print:printq;m$(n-x)" ="a;e$(n-x):end
320 data.0000254,in,km,.0254,in,m,2.54,in,cm,25.4,in,mm
330 data.0003048,ft,km,.3048,ft,m,30.48,ft,cm,304.8,ft,mm
340 data.0009144,yd,km,.9144,yd,m,91.44,yd,cm,914.4,yd,mm
350 data1.609344,mi,km,1609.344,mi,m,160934.4,mi,cm,1609344,mi,mm